package net.tngou.crawler.quartz;

import java.util.Date;
import java.util.List;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import net.tngou.crawler.enums.StateEnum;
import net.tngou.crawler.jdbc.DBManager;
import net.tngou.crawler.jdbc.OrderType;
import net.tngou.crawler.pojo.Crawlerurl;
import net.tngou.crawler.pojo.POJO;
import net.tngou.crawler.pojo.Web;
import net.tngou.crawler.service.CrawlerService;
import net.tngou.crawler.service.DrugService;


public class DrugJob implements Job {
	private static Logger _log = LoggerFactory.getLogger(DrugJob.class);
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		if(context!=null)
		_log.info("执行作业： "+context.getJobDetail().getKey() +"  执行时间："+new Date()+"********************************");
		
		DrugService service = new DrugService();
//		service.saveData();
		
		DBManager.closeConnection();
	

	}
	
	public static void main(String[] args) throws JobExecutionException {
		while (true) {
			new DrugJob().execute(null);
			
		}
	
	}
	
}

